﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.models.world.vos.actors {
    import flash.events.*;
    import flash.geom.*;
    import net.wooga.pets.events.*;
    import net.wooga.pets.interfaces.*;
    import net.wooga.pets.constants.*;

    public class AbstractActorVO implements IActing, ISpeaking {

        private var _id:String;
        private var _type:String;
        private var _state:String;
        private var _roomId:String;
        private var _nextRoomId:String;
        private var _targetRoomId:String;
        private var _targetType:String;
        private var _dispatcher:IEventDispatcher;
        private var _speechBubbleType:String;
        private var _speechBubbleData:Object;
        private var _speechBubblePosition:Point;
        private var _canWalk:Boolean;// = true
        private var _isVisible:Boolean;// = true
        private var _isMoving:Boolean;// = false
        protected var _speed:int;// = 0
        protected var _moveCommandType:String;
        protected var _variant:String;
        private var _viewRectangle:Rectangle;

        public function AbstractActorVO(_arg1:Object, _arg2:IEventDispatcher){
            this._dispatcher = _arg2;
            this._id = _arg1[ProtocolConstants.ID];
            this._type = _arg1[ProtocolConstants.ACTOR_TYPE];
            this._state = _arg1[ProtocolConstants.STATE];
            this._roomId = _arg1[ProtocolConstants.ROOM_ID];
            this._targetType = _arg1["target_type"];
            this.speechBubblePosition = new Point(0, 0);
            this._moveCommandType = EventConstants.MOVE_TO_TARGET_ROOM;
        }
        public function showSpeechBubble(_arg1:String, _arg2:Object):void{
            this._speechBubbleType = _arg1;
            this._speechBubbleData = _arg2;
            this.dispatch(new InfoEvent(EventConstants.SHOW_SPEECH_BUBBLE, this.id, null));
        }
        public function removeSpeechBubble():void{
            this.dispatch(new InfoEvent(EventConstants.REMOVE_SPEECH_BUBBLE, this.id, null));
        }
        public function get id():String{
            return (this._id);
        }
        public function get type():String{
            return (this._type);
        }
        public function set state(_arg1:String):void{
            this._state = _arg1;
        }
        public function get state():String{
            return (this._state);
        }
        public function set animationState(_arg1:String):void{
        }
        public function get animationState():String{
            return (this.state);
        }
        public function set roomId(_arg1:String):void{
            this._roomId = _arg1;
        }
        public function get roomId():String{
            return (this._roomId);
        }
        public function set nextRoomId(_arg1:String):void{
            this._nextRoomId = _arg1;
        }
        public function get nextRoomId():String{
            return (this._nextRoomId);
        }
        public function set targetRoomId(_arg1:String):void{
            this._targetRoomId = _arg1;
        }
        public function get targetRoomId():String{
            return (this._targetRoomId);
        }
        public function set targetType(_arg1:String):void{
            this._targetType = _arg1;
        }
        public function get targetType():String{
            return (this._targetType);
        }
        public function checkMove():void{
            this.dispatch(new InfoEvent(this._moveCommandType, null, this));
        }
        protected function dispatch(_arg1:Event):Boolean{
            return (this._dispatcher.dispatchEvent(_arg1));
        }
        public function get speechBubbleType():String{
            return (this._speechBubbleType);
        }
        public function get speechBubbleData():Object{
            return (this._speechBubbleData);
        }
        public function set speechBubblePosition(_arg1:Point):void{
            this._speechBubblePosition = _arg1;
        }
        public function get speechBubblePosition():Point{
            return (this._speechBubblePosition);
        }
        public function set speed(_arg1:int):void{
            this._speed = _arg1;
        }
        public function get speed():int{
            return (this._speed);
        }
        public function get isVisible():Boolean{
            return (this._isVisible);
        }
        public function set isVisible(_arg1:Boolean):void{
            this._isVisible = _arg1;
        }
        public function get isMoving():Boolean{
            return (this._isMoving);
        }
        public function set isMoving(_arg1:Boolean):void{
            this._isMoving = _arg1;
        }
        public function get canWalk():Boolean{
            return (this._canWalk);
        }
        public function set canWalk(_arg1:Boolean):void{
            this._canWalk = _arg1;
        }
        public function destroy():void{
        }
        public function set speechBubbleData(_arg1:Object):void{
            this._speechBubbleData = _arg1;
        }
        public function set speechBubbleType(_arg1:String):void{
            this._speechBubbleType = _arg1;
        }
        public function set viewRectangle(_arg1:Rectangle):void{
            this._viewRectangle = _arg1;
        }
        public function get viewRectangle():Rectangle{
            return (this._viewRectangle);
        }

    }
}//package net.wooga.pets.models.world.vos.actors 
